import yaml
import os
print(os.getcwd())
# with open('6_requests/jichu/emaple.yaml') as f:
#     data = yaml.safe_load(f)  # 安全加载（推荐）
#     print(data['app']['name'])
#     print(data)

with open('6_requests/jichu/example3.yaml') as f:
    data = yaml.safe_load(f)  # 安全加载（推荐）
    print(data)
    print(data['test_api_0001'])
    ss = yaml.safe_dump(data['test_api_0001'])#转化为yaml格式的字符串，方便替换
    print(ss)
    print(type(ss))

import json
import requests
r = requests.request(
    method='get',
    url = 'http://www.baidu.com'

)
# rs = requests.Request()
# a = json.loads(r.text)

# print(a)

with open('6_requests/jichu/example5.yaml') as f2:
    c = yaml.safe_load(f2)
    print(c)